<template>
	<view class="content">
		<image class="logo" src="/static/logo.png"></image>
		<uni-row class="w100">
			<uni-col class='mtp15'><button type="primary" @click="recorder">录音</button></uni-col>
			<uni-col class='mtp15'><button type="primary" @click="choosefile">选择文件</button></uni-col>
			<uni-col class='mtp15'><button type="primary" @click="mqtt">mqtt</button></uni-col>
			<uni-col class='mtp15'><button type="primary" @click="openWebview">打开webview</button></uni-col>
		</uni-row>
	</view>
</template>

<script>
	import utils from "../../utils/util.js"
	export default {
		data() {
			return {
				title: 'Hello Uni App',
			}
		},
		onLoad() {
		
		},
		methods: {
			recorder(){
				uni.navigateTo({
					url:"/pages/recorder/recorder"
				})
			},
			choosefile(){
				uni.navigateTo({
					url:"/pages/choosefile/choosefile"
				})
			},
			mqtt(){
				uni.navigateTo({
					url:"/pages/mqtt/mqtt"
				})
			},
			openWebview() {
				uni.navigateTo({
					url: "/pages/webview/webview"
				})
				return
				// #ifdef APP-PLUS
				var w = plus.webview.create('http://192.168.3.165:9109/public/www/#/mydocuments/1');
				w.show(); // 显示窗口
				// #endif
			},
		}
	}
</script>

<style>
	.content {
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		width: 100%;
	}
	.w100{
		width: 100%;
	}
	
	.mtp15 {
		margin-top: 15rpx;
	}
	
	.center {
		text-align: center;
		display: flex;
		justify-content: center;
	}
	
	.logo {
		height: 200rpx;
		width: 200rpx;
		margin-top: 80rpx;
		margin-left: auto;
		margin-right: auto;
		margin-bottom: 30rpx;
	}
	
	.text-area {
		display: flex;
		justify-content: center;
		flex-direction: column;
		margin-bottom: 30rpx;
	}
	
	.title {
		font-size: 36rpx;
		color: #8f8f94;
	}
</style>